const Sequelize = require('sequelize');
let db = require('../../config/lib/db');

let Department = db.define('department', {
    id: {
        filed: 'id',
        primaryKey: true,
        type: Sequelize.BIGINT,
        autoIncrement: true,
        allowNull: false
    },
    name: {
        field: 'name',
        type: Sequelize.STRING,
        allowNull: false
    }
},{
    tableName: 't_part',
    timestamps: false, // 去除createAt updateAt
    freezeTableName: true, // 锁定表名，!+s
    charset: 'utf8mb4',
    collate: 'utf8mb4_general_ci'
});

Department.sync({ force: false});

module.exports = Department;
